<!--********************************************************************
* Copyright© 2000 - 2025 SuperMap Software Co.Ltd. All rights reserved.
*********************************************************************-->
<!--********************************************************************
* 该示例需要引入 
* Echarts (https://github.com/apache/echarts)
* vue-echarts (https://github.com/ecomfe/vue-echarts)
* vue-iclient (https://github.com/SuperMap/vue-iclient)
* mapbox-gl-enhance (https://iclient.supermap.io/web/libs/mapbox-gl-js-enhance/1.12.1-12/mapbox-gl-enhance.js)
*********************************************************************-->
<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8" />
        <title data-i18n="resources.title_componentsChart_Vue(radar)"></title>
        <script type="text/javascript" include="vue" src="../js/include-web.js"></script>
        <script include="echarts-vue,iclient-mapboxgl-vue,mapbox-gl-enhance" src="../../dist/mapboxgl/include-mapboxgl.js"></script>
        <style>
            #main {
                margin: 0 auto;
                width: 100%;
                height: 100%;
            }
            .sm-component-chart .sm-component-collapse-card__content {
                height: 300px;
            }
        </style>
    </head>

    <body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%;position: absolute;top: 0;">
        <div id="main">
            <sm-web-map server-url='https://iportal.supermap.io/iportal' map-id="801571284"> </sm-web-map>
            <sm-chart icon-class="" :style="chartStyle" :dataset="dataset" :dataset-options="datasetOptions"></sm-chart>
        </div>

        <script>
            new Vue({
                el: "#main",
                data() {
                    return {
                        chartStyle: {
                            position: "absolute",
                            bottom: "10px",
                            right: "10px"
                        },
                        dataset: new SuperMap.Components.commontypes.iPortalDataParameter({
                            url: "https://iportal.supermap.io/iportal/web/datas/676516522",
                            maxFeatures: 20
                        }),
                        datasetOptions: [
                            {
                                seriesType: "radar", //图表类型
                                isStastic: true, //是否统计, 默认不统计
                                xField: "机场", //x坐标轴数据字段
                                yField: "同比增速%" //统计的数据，legned默认名字
                            }
                        ]
                    };
                }
            });
        </script>
    </body>
</html>
